<?php

include '../Core/function.php';

$data = include '../database/database.php';
foreach ($data as $key => $value) {
	$result[] = $key;
}
if( $_GET && isset($_GET['id']) && in_array($_GET['id'], $result)) {
	$id = (int)$_GET['id'];

	$str = array();

	foreach ($data as $key => $value) {
		if( $key == $id ){
			$str = $value;
			$str['id'] = $key;
		}
	}

	include '../tpl/edit.html';
}else{
	error('../index.php','非法访问');
}



?>